<script type="text/javascript" src="js/Validform_v4.0_min.js"></script>
<?php $this->beginWidget('application.widget.site.bannerWidget'); ?>
<?php $this->endWidget(); ?>
<div id="contener" _height="auto">
	<div class="left_menu">
		<?php $this->beginWidget('application.widget.site.leftWidget'); ?>
		<?php $this->endWidget(); ?>
		<?php $this->beginWidget('application.widget.site.faceWidget'); ?>
		<?php $this->endWidget(); ?>
	</div>
	<div class="main">
		<?php $this->beginWidget('application.widget.site.newWidget'); ?>
		<?php $this->endWidget(); ?>
		<div class="right_mainBox">
			<div class="right_mainBox_top"></div>
			<div class="mainMenu"> <img src="images/title20.png" width="726" height="23" alt="聯絡我們" title="聯絡我們" />
				<p><span class="red">*</span>為必填欄位。 </p>
			</div>
			<div class="mainContentBox">
				<div class="memberBOX">
					<form class="contactForm" action="" method="post">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="10" align="left" valign="middle" nowrap="nowrap">&nbsp;</td>
								<td colspan="3" align="left" valign="middle">&nbsp;</td>
							</tr>
							<tr>
								<td width="11%" height="35" align="left" valign="middle" nowrap="nowrap">類別：</td>
								<td colspan="3" align="left" valign="middle">
								<select name="class" id="class" datatype="select" nullmsg="請選擇類別！" errormsg="請選擇類別！">
										<option value="">-----------------------請選擇-----------------------</option>
										<option value="活動相關">活動相關</option>
										<option value="個人帳號">個人帳號</option>
										<option value="訂單相關">訂單相關</option>
										<option value="技術相關">技術相關</option>
										<option value="業務合作">業務合作</option>
										<option value="其它">其它</option>
									</select>
								</td>
							</tr>
							<tr>
								<td height="20" align="left" valign="middle" nowrap="nowrap">&nbsp;</td>
								<td colspan="3" align="left" valign="middle">&nbsp;</td>
							</tr>
							<tr>
								<td height="35" colspan="4" align="left" valign="middle" nowrap="nowrap" class="title03">聯絡資訊</td>
							</tr>
							<tr>
								<td height="20" colspan="4" align="left" valign="middle" nowrap="nowrap">&nbsp;</td>
							</tr>
							<tr>
								<td height="35" align="left" valign="middle" nowrap="nowrap">名字：</td>
								<td width="40%" align="left" valign="middle">
									<input name="name" type="text" id="name" size="20" nullmsg="請輸入名字!" datatype="s1-20" errormsg="請正確輸入名字" />
									<span class="red">*</span></td>
								<td width="11%" align="left" valign="middle">姓氏：</td>
								<td align="left" valign="middle">
									<input name="lastname" type="text" id="lastname" size="20" nullmsg="請輸入姓氏!" datatype="s1-10" errormsg="請正確輸入姓氏" />
									<span class="red">*</span></td>
							</tr>
							<tr>
								<td height="35" align="left" valign="middle" nowrap="nowrap">電話：</td>
								<td align="left" valign="middle">
									<input name="phone" type="text" id="phone" size="20" />
								</td>
								<td align="left" valign="middle">歲次：</td>
								<td align="left" valign="middle">
									<input type="text" name="age" id="age" />
								</td>
							</tr>
							<tr>
								<td height="35" align="left" valign="middle" nowrap="nowrap">E-mail：</td>
								<td colspan="3" align="left" valign="middle">
									<input name="email" type="text" id="email" size="60" datatype="e" nullmsg="請輸入E-mail!" errormsg="請填寫正確的E-mail地址。" />
									<span class="red">*</span></td>
							</tr>
							<tr>
								<td height="35" align="left" valign="middle" nowrap="nowrap">再次確認E-mail：</td>
								<td colspan="3" align="left" valign="middle">
									<label for="textfield7"></label>
									<input name="reemail" type="text" id="reemail" size="60" datatype="*" nullmsg="請再次確認E-mail!" recheck="email" errormsg="您兩次輸入的郵箱不一致！" />
									<span class="red">*</span></td>
							</tr>
							<tr>
								<td height="20" align="left" valign="middle" nowrap="nowrap">&nbsp;</td>
								<td height="20" align="left" valign="middle">&nbsp;</td>
								<td height="20" align="center" valign="middle">&nbsp;</td>
								<td height="20" align="center" valign="middle">&nbsp;</td>
							</tr>
							<tr>
								<td height="35" colspan="4" align="left" valign="middle" nowrap="nowrap" class="title03">問題</td>
							</tr>
							<tr>
								<td height="20" align="left" valign="middle" nowrap="nowrap">&nbsp;</td>
								<td align="left" valign="middle">&nbsp;</td>
								<td align="center" valign="middle">&nbsp;</td>
								<td align="center" valign="middle">&nbsp;</td>
							</tr>
							<tr>
								<td height="35" align="left" valign="middle" nowrap="nowrap">主題：</td>
								<td colspan="3" align="left" valign="middle">
									<input name="title" type="text" id="title" size="60" datatype="*1-50" nullmsg="請填入主題!" errormsg="主題超長，允許50個字符以內的文字！"  />
									<span class="red">*</span></td>
							</tr>
							<tr>
								<td height="130" align="left" valign="middle" nowrap="nowrap">內容：</td>
								<td colspan="3" align="left" valign="middle">
									<textarea name="message" id="message" cols="57" rows="8" datatype="*" value="" nullmsg="請填入內容!"></textarea>
									<span class="red">*</span></td>
							</tr>
							<tr>
								<td height="35" align="left" valign="middle" nowrap="nowrap">&nbsp;</td>
								<td align="left" valign="middle"></td>
								<td align="center" valign="middle">&nbsp;</td>
								<td align="left" valign="middle">
									<input type="submit" value="送出" />
								</td>
							</tr>
						</table>
					</form>
				</div>
			</div>
			<div class="right_mainBox_bottom"></div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function(){
	var showmsg=function(msg){//假定你的信息提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
		if(msg!='通過資料驗證！'){
			alert(msg);
		}		
	}
	$(".contactForm").Validform({
		tiptype:function(msg){
			showmsg(msg);
		},
		datatype:{//传入自定义datatype类型，可以是正则，也可以是函数（函数内可以获得两个参数）;			
		},
		callback:function(form){
			if(document.getElementById('message').value.length>500){
				alert('內容超長，允許500字以內的內容');
			}else{
				form.get(0).submit();
			}
		},
	});
})
</script>